﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Web.Models
{
    public class WebPage
    {
        public string Name { get; set; }
        public string Path { get; set; }

        public Menu Menu
        {
            get
            {
                Menu menu = WebSite.Menu.FirstOrDefault(o => o.Name == Name);
                if (menu == null)
                    menu = WebSite.Menu.FirstOrDefault(o => o.Name == WebSite.MissingPage.Name);
                return menu;
            }
        }

        public WebSite WebSite { get; set; }
    }
}
